Learn R Programming

gmp (version 0.3-1)

Bigq operators: Basic arithmetic operators for large rationals

Description

Addition, substraction, multiplication, division.

Usage

add.bigq(a, b)
a + b (if a or b is a bigq vector)
sub.bigq(a, b=NULL)
a - b (if a or b is a bigq vector)
mul.bigq(a, b)
a * b (if a or b is a bigq vector)
div.bigq(a, b)
a / b (if a or b is a bigq vector)
abs.bigq(a)

Arguments

a,b
bigq, integer or string from an integer
...
Additional parameters

Value

  • A bigq class representing the result of the arithmetic operation.

References

http://mulcyber.toulouse.inra.fr/projects/gmp/

Examples

Run this code
# 1/3+1=4/3
as.bigq(1,3) + 1

Run the code above in your browser using DataLab